// 保存你的网站、应用的路由
import Layout from "layouts/MainLayout.vue";
/**
 * title: 'title'  名称显示在侧边栏和breadcrumb(推荐设置)
 * isOpen: 是否默认打开页面
 * show: 控制这个组件是否显示
 * oneMenuShow: 默认打开第一级菜单
 */
export const routes = [
  {
    path: "/redirect",
    component: Layout,
    meta: {
      hidden: true,
    },
    children: [
      {
        path: "/redirect/:path(.*)",
        component: () => import("pages/redirect/index"),
      },
    ],
  },
  /*       login      */
  {
    path: "/login",
    component: () => import("pages/login/index"),
    name: "Login",
    meta: {
      hidden: true,
    },
  },
  /*       机器      */
  {
    path: "/",
    component: Layout,
    redirect: "/dashboard",
    name: "Dashboard",
    meta: {
      title: "总览",
      fixedMenu: "机器",
      affix: true,
      icon: "mdi-chart-box-outline",
    },
    children: [
      {
        path: "/realTimeState",
        component: () => import("pages/dashboard/realTimeState/index"),
        name: "RealTimeState",
        meta: {
          title: "发电总览",
          show: 1,
          oneMenuShow: 1,
          icon: "mdi-circle-medium",
        },
      },
      {
        path: "/workpiece",
        component: () => import("pages/dashboard/realTimeState/index2"),
        name: "Workpiece",
        meta: {
          title: "电站地图",
          show: 1,
          icon: "mdi-circle-medium",
        },
      },
      {
        path: "/stantTime",
        component: () => import("pages/dashboard/realTimeState/index3"),
        name: "StantTime",
        meta: {
          title: "电站列表",
          show: 1,
          icon: "mdi-circle-medium",
        },
      },
    ],
  },
  {
    path: "/workShop",
    component: Layout,
    redirect: "/workShop/pandect/index",
    name: "workShop",
    meta: {
      title: "电站监测",
      fixedMenu: "机器",
      icon: "mdi-sort-descending",
      affix: true,
    },
    children: [
      {
        path: "/pandect",
        component: () => import("pages/dashboard/ceshi2/index1"),
        name: "Pandect",
        meta: {
          title: "发电量",
          show: 1,
          icon: "mdi-circle-medium",
        },
      },
      {
        path: "/Time",
        component: () => import("pages/dashboard/ceshi2/index2"),
        name: "TimeSever",
        meta: {
          title: "状态监测",
          show: 1,
          icon: "mdi-circle-medium",
        },
      },
      {
        path: "/production",
        component: () => import("pages/dashboard/ceshi2/index3"),
        name: "Production",
        meta: {
          title: "日志",
          show: 1,
          icon: "mdi-circle-medium",
        },
      },
    ],
  },
  {
    path: "/plant",
    component: Layout,
    redirect: "/plant/capacity/index",
    name: "Plant",
    meta: {
      title: "运维管理",
      fixedMenu: "机器",
      icon: "mdi-book-cog-outline",
      affix: true,
    },
    children: [
      {
        path: "/aerial",
        component: () => import("pages/dashboard/ceshi3/index1"),
        name: "Aerial",
        meta: {
          title: "故障清单",
          show: 1,
          icon: "mdi-circle-medium",
        },
      },
      {
        path: "/capacity",
        component: () => import("pages/dashboard/ceshi3/index2"),
        name: "Capacity",
        meta: {
          title: "运维计划",
          show: 1,
          icon: "mdi-circle-medium",
        },
      },
      {
        path: "/bottleneck",
        component: () => import("pages/dashboard/ceshi3/index3"),
        name: "Bottleneck",
        meta: {
          title: "任务跟踪",
          show: 1,
          icon: "mdi-circle-medium",
        },
      },
    ],
  },
  {
    path: "/Ledger",
    component: Layout,
    redirect: "pages/dashboard/standing/index",
    name: "Ledger",
    meta: {
      title: "统计报表",
      fixedMenu: "机器",
      icon: "mdi-clipboard-list-outline",
      affix: true,
    },
    children: [
      {
        path: "/standing",
        component: () => import("pages/dashboard/ceshi4/index"),
        name: "standing",
        meta: {
          title: "发电报表",
          show: 1,
          icon: "mdi-circle-medium",
        },
      },
      {
        path: "/relevance",
        component: () => import("pages/dashboard/ceshi4/index2"),
        name: "Relevance",
        meta: {
          title: "维修报表",
          show: 1,
          icon: "mdi-circle-medium",
        },
      },
    ],
  },
  /*      生产        */
  {
    path: "/work",
    component: Layout,
    redirect: "/work/always/index",
    name: "Work",
    meta: {
      title: "能效分析",
      fixedMenu: "机器",
      icon: "mdi-chart-line",
      affix: true,
    },
    children: [
      {
        path: "/always",
        component: () => import("pages/dashboard/ceshi5/index1"),
        name: "Always",
        meta: {
          title: "落灰评估",
          show: 1,
          icon: "mdi-chart-bar",
        },
      },
      {
        path: "/order",
        component: () => import("pages/dashboard/ceshi5/index2"),
        name: "Order",
        meta: {
          title: "运维费用发电量比",
          show: 1,
          icon: "mdi-circle-medium",
        },
      },
    ],
  },
  /*     警报      */
  {
    path: "/eventInform",
    component: Layout,
    redirect: "/eventInform/informMangement/index",
    name: "EventInform",
    meta: {
      title: "档案管理",
      fixedMenu: "机器",
      affix: true,
      icon: "mdi-toy-brick-search-outline",
    },
    children: [
      {
        path: "/msg",
        component: () => import("pages/dashboard/ceshi6/index1"),
        name: "Msg",
        meta: {
          title: "站点档案",
          show: 1,
          icon: "mdi-circle-medium",
        },
      },
      {
        path: "/informMangement",
        component: () => import("pages/dashboard/ceshi6/index2"),
        name: "InformMangement",
        meta: {
          title: "站点设备",
          show: 1,
          icon: "mdi-circle-medium",
        },
      },
    ],
  },
  /*     系统     
  {
    path: "/systemSet",
    component: Layout,
    redirect: "/systemSet/personInfo/index",
    name: "SystemSet",
    meta: {
      title: "系统配置 system",
      fixedMenu: "系统",
      affix: true,
      icon: "mdi-file-cog",
      roles: ["系统管理员"],
    },
    children: [
      {
        path: "/theme",
        component: () => import("pages/systemSet/theme"),
        name: "Theme",
        meta: {
          title: "主题",
          show: 1,
          oneMenuShow: 1,
          icon: "mdi-circle-medium",
        },
      },
      {
        path: "/personInfo",
        component: () => import("pages/systemSet/personInfo/index"),
        name: "PersonInfo",
        meta: {
          title: "个人信息",
          show: 1,
          icon: "mdi-circle-medium",
        },
      },
      {
        path: "/personAdmini",
        component: () => import("pages/systemSet/personAdmini/index"),
        name: "PersonAdmini",
        meta: {
          title: "人员管理",
          show: 1,
          icon: "mdi-circle-medium",
        },
      },
      {
        path: "/corporate",
        component: () => import("pages/systemSet/corporate/index"),
        name: "Corporate",
        meta: {
          title: "公司信息",
          show: 1,
          icon: "mdi-circle-medium",
        },
      },
      // {
      //     path: '/paramsSet',
      //     component: () =>
      //         import ('pages/systemSet/paramsSet/index'),
      //     name: 'ParamsSet',
      //     meta: {
      //         title: '参数设置',
      //         icon: 'mdi-circle-medium'
      //     }
      // },
      {
        path: "/permission",
        component: () => import("pages/systemSet/permission/index"),
        name: "Permission",
        meta: {
          title: "权限配置",
          show: 1,
          icon: "mdi-circle-medium",
        },
      },
      {
        path: "/upgradeSystem",
        component: () => import("pages/systemSet/upgradeSystem/index"),
        name: "UpgradeSystem",
        meta: {
          title: "系统升级",
          show: 1,
          icon: "mdi-circle-medium",
        },
      },
    ],
  },  */
  {
    path: "/errorPermission",
    component: () => import("pages/errorPermission/index.vue"),
  },
  {
    path: "/:catchAll(.*)*",
    component: () => import("pages/Error404.vue"),
  },

  // Always leave this as last one,
  // but you can also remove it
];

export default routes;
